.class public final Lkairo/android/i/m;
.super Ljava/lang/Object;


# direct methods
.method public static a(Ljava/lang/String;)Ljava/lang/String;
    .locals 2

    const/4 v0, 0x2

    const/16 v1, 0x20

    invoke-static {p0, v0, v1}, Lkairo/android/i/m;->a(Ljava/lang/String;IC)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static a(Ljava/lang/String;IC)Ljava/lang/String;
    .locals 5

    const-string v1, ""

    invoke-static {p2}, Ljava/lang/String;->valueOf(C)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->getBytes()[B

    move-result-object v0

    array-length v2, v0

    invoke-virtual {p0}, Ljava/lang/String;->getBytes()[B

    move-result-object v0

    array-length v0, v0

    sub-int v3, p1, v0

    const/4 v0, 0x0

    :goto_0
    if-ge v0, v3, :cond_0

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    add-int/2addr v0, v2

    goto :goto_0

    :cond_0
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 5

    const/4 v1, 0x0

    const-string v0, "\t"

    invoke-static {p1, v0, v1, v1}, Lkairo/android/i/m;->a(Ljava/lang/String;Ljava/lang/String;ZZ)[Ljava/lang/String;

    move-result-object v2

    move v0, v1

    :goto_0
    array-length v3, v2

    if-ge v0, v3, :cond_0

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "<"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ">"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    aget-object v4, v2, v0

    invoke-static {v4, v1}, Lkairo/android/i/h;->a(Ljava/lang/String;Z)Ljava/lang/String;

    move-result-object v4

    invoke-static {p0, v3, v4}, Lkairo/android/i/m;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p0

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_0
    return-object p0
.end method

.method public static a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 3

    :goto_0
    invoke-virtual {p0, p1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    const/4 v1, -0x1

    if-eq v0, v1, :cond_0

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const/4 v2, 0x0

    invoke-virtual {p0, v2, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v2

    add-int/2addr v0, v2

    invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    goto :goto_0

    :cond_0
    return-object p0
.end method

.method public static a([B)Ljava/lang/String;
    .locals 2

    invoke-static {p0}, Lkairo/android/i/m;->b([B)Ljava/lang/String;

    move-result-object v1

    if-eqz v1, :cond_0

    :try_start_0
    new-instance v0, Ljava/lang/String;

    invoke-direct {v0, p0, v1}, Ljava/lang/String;-><init>([BLjava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-object v0

    :catch_0
    move-exception v0

    :cond_0
    new-instance v0, Ljava/lang/String;

    invoke-direct {v0, p0}, Ljava/lang/String;-><init>([B)V

    goto :goto_0
.end method

.method public static a(Ljava/lang/String;Ljava/lang/String;ZZ)[Ljava/lang/String;
    .locals 7

    const/4 v6, -0x1

    const/4 v2, 0x0

    if-eqz p0, :cond_0

    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v0

    if-nez v0, :cond_1

    :cond_0
    new-array v0, v2, [Ljava/lang/String;

    :goto_0
    return-object v0

    :cond_1
    new-instance v3, Lkairo/android/i/e;

    invoke-direct {v3}, Lkairo/android/i/e;-><init>()V

    const-string v0, ""

    move v1, v2

    :cond_2
    invoke-virtual {p0, p1, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;I)I

    move-result v4

    if-ne v4, v6, :cond_4

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {p0, v1}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    :goto_1
    if-eqz p2, :cond_3

    invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    :cond_3
    invoke-virtual {v3, v0}, Lkairo/android/i/e;->a(Ljava/lang/Object;)V

    const-string v0, ""

    if-ne v4, v6, :cond_2

    iget v0, v3, Lkairo/android/i/e;->b:I

    new-array v1, v0, [Ljava/lang/String;

    :goto_2
    array-length v0, v1

    if-ge v2, v0, :cond_5

    iget-object v0, v3, Lkairo/android/i/e;->c:[Ljava/lang/Object;

    aget-object v0, v0, v2

    check-cast v0, Ljava/lang/String;

    aput-object v0, v1, v2

    add-int/lit8 v2, v2, 0x1

    goto :goto_2

    :cond_4
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {p0, v1, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v1

    add-int/2addr v1, v4

    goto :goto_1

    :cond_5
    move-object v0, v1

    goto :goto_0
.end method

.method public static a(Lkairo/android/i/g;Ljava/lang/String;)[Ljava/lang/String;
    .locals 6

    const/4 v0, 0x0

    :try_start_0
    invoke-virtual {p0, p1}, Lkairo/android/i/g;->a(Ljava/lang/String;)Ljava/io/InputStream;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result-object v1

    if-nez v1, :cond_1

    if-eqz v1, :cond_0

    invoke-virtual {v1}, Ljava/io/InputStream;->close()V

    :cond_0
    :goto_0
    return-object v0

    :cond_1
    :try_start_1
    invoke-static {v1}, Lkairo/android/i/l;->b(Ljava/io/InputStream;)[B

    move-result-object v0

    new-instance v2, Ljava/lang/String;

    invoke-direct {v2, v0}, Ljava/lang/String;-><init>([B)V

    const-string v0, "\n"

    const/4 v3, 0x0

    const/4 v4, 0x0

    invoke-static {v2, v0, v3, v4}, Lkairo/android/i/m;->a(Ljava/lang/String;Ljava/lang/String;ZZ)[Ljava/lang/String;
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    move-result-object v0

    if-eqz v1, :cond_0

    invoke-virtual {v1}, Ljava/io/InputStream;->close()V

    goto :goto_0

    :catchall_0
    move-exception v1

    move-object v5, v1

    move-object v1, v0

    move-object v0, v5

    :goto_1
    if-eqz v1, :cond_2

    invoke-virtual {v1}, Ljava/io/InputStream;->close()V

    :cond_2
    throw v0

    :catchall_1
    move-exception v0

    goto :goto_1
.end method

.method public static b(Ljava/lang/String;)Ljava/lang/String;
    .locals 2

    const/4 v0, 0x2

    const/16 v1, 0x20

    invoke-static {p0, v0, v1}, Lkairo/android/i/m;->a(Ljava/lang/String;IC)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private static b([B)Ljava/lang/String;
    .locals 11

    const/16 v9, 0x1b

    const/16 v8, 0x24

    const/4 v1, 0x1

    const/16 v10, 0x80

    const/4 v4, 0x0

    array-length v5, p0

    move v2, v4

    move v0, v4

    :goto_0
    if-ge v2, v5, :cond_3

    aget-byte v3, p0, v2

    and-int/lit16 v3, v3, 0xff

    const/4 v6, 0x6

    if-le v3, v6, :cond_0

    const/16 v6, 0x7f

    if-eq v3, v6, :cond_0

    const/16 v6, 0xff

    if-ne v3, v6, :cond_2

    :cond_0
    if-nez v3, :cond_1

    add-int/lit8 v0, v5, -0x1

    if-ge v2, v0, :cond_1

    add-int/lit8 v0, v2, 0x1

    aget-byte v0, p0, v0

    and-int/lit16 v0, v0, 0xff

    const/16 v3, 0x7f

    if-gt v0, v3, :cond_1

    const-string v0, "UTF-16"

    :goto_1
    return-object v0

    :cond_1
    move v0, v1

    :cond_2
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_3
    if-eqz v0, :cond_4

    const/4 v0, 0x0

    goto :goto_1

    :cond_4
    move v0, v4

    :goto_2
    if-ge v0, v5, :cond_1f

    aget-byte v2, p0, v0

    and-int/lit16 v2, v2, 0xff

    if-eq v2, v9, :cond_5

    if-gt v10, v2, :cond_6

    :cond_5
    move v0, v4

    :goto_3
    if-eqz v0, :cond_7

    const-string v0, "ASCII"

    goto :goto_1

    :cond_6
    add-int/lit8 v0, v0, 0x1

    goto :goto_2

    :cond_7
    move v0, v4

    :goto_4
    add-int/lit8 v2, v5, -0x2

    if-ge v0, v2, :cond_f

    aget-byte v2, p0, v0

    and-int/lit16 v2, v2, 0xff

    add-int/lit8 v3, v0, 0x1

    aget-byte v3, p0, v3

    and-int/lit16 v3, v3, 0xff

    add-int/lit8 v6, v0, 0x2

    aget-byte v6, p0, v6

    and-int/lit16 v6, v6, 0xff

    if-ne v2, v9, :cond_e

    if-ne v3, v8, :cond_8

    const/16 v2, 0x40

    if-ne v6, v2, :cond_8

    const-string v0, "JIS"

    goto :goto_1

    :cond_8
    if-ne v3, v8, :cond_9

    const/16 v2, 0x42

    if-ne v6, v2, :cond_9

    const-string v0, "JIS"

    goto :goto_1

    :cond_9
    const/16 v2, 0x28

    if-ne v3, v2, :cond_b

    const/16 v2, 0x42

    if-eq v6, v2, :cond_a

    const/16 v2, 0x4a

    if-ne v6, v2, :cond_b

    :cond_a
    const-string v0, "JIS"

    goto :goto_1

    :cond_b
    const/16 v2, 0x28

    if-ne v3, v2, :cond_c

    const/16 v2, 0x49

    if-ne v6, v2, :cond_c

    const-string v0, "JIS"

    goto :goto_1

    :cond_c
    add-int/lit8 v2, v5, -0x3

    if-ge v0, v2, :cond_e

    add-int/lit8 v2, v0, 0x3

    aget-byte v2, p0, v2

    and-int/lit16 v2, v2, 0xff

    if-ne v3, v8, :cond_d

    const/16 v7, 0x28

    if-ne v6, v7, :cond_d

    const/16 v7, 0x44

    if-ne v2, v7, :cond_d

    const-string v0, "JIS"

    goto :goto_1

    :cond_d
    add-int/lit8 v7, v5, -0x5

    if-ge v0, v7, :cond_e

    const/16 v7, 0x26

    if-ne v3, v7, :cond_e

    const/16 v3, 0x40

    if-ne v6, v3, :cond_e

    if-ne v2, v9, :cond_e

    add-int/lit8 v2, v0, 0x4

    aget-byte v2, p0, v2

    and-int/lit16 v2, v2, 0xff

    if-ne v2, v8, :cond_e

    add-int/lit8 v2, v0, 0x5

    aget-byte v2, p0, v2

    and-int/lit16 v2, v2, 0xff

    const/16 v3, 0x42

    if-ne v2, v3, :cond_e

    const-string v0, "JIS"

    goto/16 :goto_1

    :cond_e
    add-int/lit8 v0, v0, 0x1

    goto :goto_4

    :cond_f
    move v0, v4

    move v2, v4

    :goto_5
    add-int/lit8 v3, v5, -0x1

    if-ge v0, v3, :cond_15

    aget-byte v3, p0, v0

    and-int/lit16 v3, v3, 0xff

    add-int/lit8 v6, v0, 0x1

    aget-byte v6, p0, v6

    and-int/lit16 v6, v6, 0xff

    const/16 v7, 0x81

    if-gt v7, v3, :cond_10

    const/16 v7, 0x9f

    if-le v3, v7, :cond_11

    :cond_10
    const/16 v7, 0xe0

    if-gt v7, v3, :cond_14

    const/16 v7, 0xfc

    if-gt v3, v7, :cond_14

    :cond_11
    const/16 v3, 0x40

    if-gt v3, v6, :cond_12

    const/16 v3, 0x7e

    if-le v6, v3, :cond_13

    :cond_12
    if-gt v10, v6, :cond_14

    const/16 v3, 0xfc

    if-gt v6, v3, :cond_14

    :cond_13
    add-int/lit8 v2, v2, 0x2

    add-int/lit8 v0, v0, 0x1

    :cond_14
    add-int/lit8 v0, v0, 0x1

    goto :goto_5

    :cond_15
    move v0, v4

    move v3, v4

    :goto_6
    add-int/lit8 v6, v5, -0x1

    if-ge v0, v6, :cond_18

    aget-byte v6, p0, v0

    and-int/lit16 v6, v6, 0xff

    add-int/lit8 v7, v0, 0x1

    aget-byte v7, p0, v7

    and-int/lit16 v7, v7, 0xff

    const/16 v8, 0xc0

    if-gt v8, v6, :cond_17

    const/16 v8, 0xdf

    if-gt v6, v8, :cond_17

    if-gt v10, v7, :cond_17

    const/16 v8, 0xbf

    if-gt v7, v8, :cond_17

    add-int/lit8 v3, v3, 0x2

    add-int/lit8 v0, v0, 0x1

    :cond_16
    :goto_7
    add-int/lit8 v0, v0, 0x1

    goto :goto_6

    :cond_17
    add-int/lit8 v8, v5, -0x2

    if-ge v0, v8, :cond_16

    add-int/lit8 v8, v0, 0x2

    aget-byte v8, p0, v8

    and-int/lit16 v8, v8, 0xff

    const/16 v9, 0xe0

    if-gt v9, v6, :cond_16

    const/16 v9, 0xef

    if-gt v6, v9, :cond_16

    if-gt v10, v7, :cond_16

    const/16 v6, 0xbf

    if-gt v7, v6, :cond_16

    if-gt v10, v8, :cond_16

    const/16 v6, 0xbf

    if-gt v8, v6, :cond_16

    add-int/lit8 v3, v3, 0x3

    add-int/lit8 v0, v0, 0x2

    goto :goto_7

    :cond_18
    const/4 v0, 0x2

    new-array v5, v0, [I

    mul-int/lit8 v0, v3, 0xa

    aput v0, v5, v4

    mul-int/lit8 v0, v2, 0xa

    aput v0, v5, v1

    const/4 v0, 0x2

    new-array v2, v0, [Ljava/lang/String;

    const-string v0, "UTF-8"

    aput-object v0, v2, v4

    const-string v0, "Shift_JIS"

    aput-object v0, v2, v1

    aget v0, v5, v4

    add-int/lit8 v0, v0, 0x1

    aput v0, v5, v4

    move v0, v4

    :goto_8
    array-length v1, v5

    add-int/lit8 v1, v1, -0x1

    if-ge v0, v1, :cond_1b

    array-length v1, v5

    add-int/lit8 v1, v1, -0x1

    :goto_9
    if-le v1, v0, :cond_1a

    add-int/lit8 v3, v1, -0x1

    aget v3, v5, v3

    aget v6, v5, v1

    if-ge v3, v6, :cond_19

    aget v3, v5, v1

    add-int/lit8 v6, v1, -0x1

    aget v6, v5, v6

    aput v6, v5, v1

    add-int/lit8 v6, v1, -0x1

    aput v3, v5, v6

    aget-object v3, v2, v1

    add-int/lit8 v6, v1, -0x1

    aget-object v6, v2, v6

    aput-object v6, v2, v1

    add-int/lit8 v6, v1, -0x1

    aput-object v3, v2, v6

    :cond_19
    add-int/lit8 v1, v1, -0x1

    goto :goto_9

    :cond_1a
    add-int/lit8 v0, v0, 0x1

    goto :goto_8

    :cond_1b
    move v0, v4

    :goto_a
    array-length v1, v2

    if-ge v0, v1, :cond_1e

    :try_start_0
    new-instance v3, Ljava/lang/String;

    aget-object v1, v2, v0

    invoke-direct {v3, p0, v1}, Ljava/lang/String;-><init>([BLjava/lang/String;)V

    move v1, v4

    :goto_b
    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v5

    if-ge v1, v5, :cond_1d

    invoke-virtual {v3, v1}, Ljava/lang/String;->charAt(I)C

    move-result v5

    const v6, 0xfffd

    if-ne v5, v6, :cond_1c

    :goto_c
    add-int/lit8 v0, v0, 0x1

    goto :goto_a

    :cond_1c
    add-int/lit8 v1, v1, 0x1

    goto :goto_b

    :cond_1d
    aget-object v0, v2, v0
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto/16 :goto_1

    :cond_1e
    const/4 v0, 0x0

    goto/16 :goto_1

    :catch_0
    move-exception v1

    goto :goto_c

    :cond_1f
    move v0, v1

    goto/16 :goto_3
.end method

.method public static b(Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;
    .locals 2

    const/4 v0, 0x1

    const/4 v1, 0x0

    invoke-static {p0, p1, v0, v1}, Lkairo/android/i/m;->a(Ljava/lang/String;Ljava/lang/String;ZZ)[Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method
